package team.pwy.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import team.pwy.pojo.entity.Message;

/**
 * 本来用来演示:
 *
 * @author feng
 * @date 2023/10/27
 * @Description
 */
@Repository
public interface MessageMapper {

    @Insert("insert into pwy.pwy_message(id,user_id,message,status,create_time,type) values(null,#{userId},#{message},#{status},#{createTime},#{type}) ")
    Integer addMessage(Message message);

    @Update("update pwy.pwy_message set status=0 where  user_id=#{value}")
    Integer upStatus(Integer id);

}
